<template>
  <div class="about">
    <h1 style="margin-left: 20px;">这里是简易登陆也面</h1>
    <h2 style="margin-left: 20px;">请选择你的角色：</h2>
    <el-radio-group v-model="radio" style="margin-left: 20px;">
      <el-radio v-for="(item, index) in userList" :key="index" :label="index" size="large" border>{{ item.nikeName }}</el-radio>
    </el-radio-group>
    <div style="margin-left: 20px; padding-top: 30px;">
      <el-button @click="login">登陆</el-button>
    </div>
  </div>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
  data() {
    return {
      radio: 0,
      userList: [
        {
          userId: 'zxz0',
          nikeName: '用户0',
          userSig: 'eJyrVgrxCdYrSy1SslIy0jNQ0gHzM1NS80oy0zLBwlUVVTDx4pTsxIKCzBQlK0MTAwNzcyNzYyOITGpFQWZRKlDc1NTUyMDAACJakpkLEjMzszQ3MDWzsISakpkONLasUjvIKTCrzM3MP9iyoMQi3c3S3dHEO8DD27hMO8gzRt8tMaIsscQlRj-Zr9hWqRYAOaIxCA__'
        },
        {
          userId: 'zxz1',
          nikeName: '用户1',
          userSig: 'eJwtzMEKgkAUheF3mXXIdZyZi0ILoUWLCMyKWkpO40WUySwuRu*eqcvzHfg-4rjLg7ftRCJkAGI1bSpt29OdJh54CBd-lnXhPZUiCRUAosRIzo9lT50dXWstAWDWnpq-GRMjaARcKuTG7B6KaMN16m5cXQ8mpUvcqEyd8lfGreZtczYPrtLBW7cW3x-o4DGX'
        },
        {
          userId: 'zxz2',
          nikeName: '用户2',
          userSig: 'eJwtzFELgjAYheH-suuQr9WcE7oQglqMgoryNthWn1kOtZhG-z1TL89z4P2QozoEb1OSmNAAyKTfqM2zRos9t76lo1f6fnEONYmncwDOKZ-R4THeYWk6Z4xRABi0xsffwlBwYJyKsYLXLntOEp0JVTXFepXvN9Kj2KZZ414yL20aRTuJJ2X9DZbFgnx-*UIxvA__'
        }
      ]
    }
  },
  methods: {
    login() {
      const obj = this.$router.resolve({ path: '/home', query: { index: this.radio} })
      window.open(obj.href, '_blank')
    }
  }
})
</script>
<style>
@media (min-width: 1024px) {
  .about {
    min-height: 100vh;
  }
}
</style>
